//
//  SearchViewController.m
//  futureLive
//
//  Created by zhoubiwen on 15/11/18.
//  Copyright © 2015年 ZHOU_LI_SUN. All rights reserved.
//

#import "SearchViewController.h"

@interface SearchViewController ()
@property (nonatomic, strong) UISearchBar *searchBar;
@end

@implementation SearchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initData];
    [self initSubViews];
}
/**
 *  初始化数据
 */
- (void)initData {
    
    
}

/**
 *  初始化子视图
 */
- (void)initSubViews {
    self.view.backgroundColor = [UIColor whiteColor];
    self.searchBar = [[UISearchBar alloc]init];
//    self.searchBar.center = self.navigationItem.titleView.center;
    self.navigationItem.titleView = self.searchBar;

    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapGestureAction:)];
    [self.view addGestureRecognizer:tapGesture];
}

- (void)tapGestureAction:(UITapGestureRecognizer *)tapGeture {

    [self.searchBar endEditing:YES];
}

- (void)leftBarButtonItem:(UIBarButtonItem *)barButtonItem {
    

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
